{% extends "bootstrap/base.html" %}

{% block title %} HDBox{% endblock %}

{% block navbar %}
<div class="navbar navbar-inverse" role="navigation">
  <div class="container">
    <div class="navbar-header">
      <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
        <span class="sr-only"> Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a class="navbar-brand" href="/">HDBox - 黑大盒子</a>
    </div>
    <div class="navbar-collapse collapse">

    <ul class="nav navbar-nav">
      <li><a href="/">首页</a></li>
      <li><a href="/add_news">添加新闻</a></li>
      <li><a href="/manage_news">管理新闻</a></li>
      <li><a href="/manage_launch_img">管理启动页</a></li>
    </ul>

    <ul class="nav navbar-nav navbar-right">
      {% if current_user.is_authenticated %}
      <li><a href="{{url_for('auth.logout')}}">退出</a></li>
      {% else %}
      <li><a href="{{url_for('auth.login')}}">登录</a></li>
      {% endif %}
    </ul>
  </div>
</div>
</div>
{% endblock %}
{% block content %}
<div class="container">
  {% block page_content %}{% endblock %}
</div>
{% endblock %}
